package file;

import java.io.File;

public class DeleteFileDemo {
    public static void main(String[] args) {
        File file = new File("C:\\Users\\tedu");
        if (file.exists()){
            File[] subs = file.listFiles(a ->a.getName().startsWith("."));
            for(File s:subs){
                System.out.println(s.getName());
            }
        }else {
            System.out.println("文件不存在");
        }
    }
}
